/**
 * Copyright &copy; 2012-2014 <a href="https://github.com/thinkgem/jeesite">JeeSite</a> All rights reserved.
 */
package com.jims.master.modules.doctor.netHosptial.dao;

import com.jims.master.common.persistence.CrudDao;
import com.jims.master.common.persistence.annotation.MyBatisDao;
import com.jims.master.modules.doctor.netHosptial.entity.NetPatMaster;
import org.apache.ibatis.annotations.Param;

import java.util.List;


/**
 * 患者主记录DAO接口
 * @author zp
 * @version 2016-05-31
 */
@MyBatisDao
public interface NetPatMasterDao extends CrudDao<NetPatMaster> {
    /**
     * 通过用户baseid获取病人基本信息
     * @param idNo
     * @return
     */
	public NetPatMaster getAll(@Param("idNo") String idNo);

    public List<NetPatMaster> selectAll(@Param("idNo") String idNo, @Param("patientId") String patientId);

    public List<NetPatMaster> selectClinicAll(NetPatMaster netPatMaster);

    public List<NetPatMaster> selectVisitAll(NetPatMaster netPatMaster);

    //通过身份证查询
    public NetPatMaster findIndexInfoByIdNo(NetPatMaster netPatMaster);

    //通过身份证查询义诊患者
    public NetPatMaster findIndexFreeInfoByIdNo(NetPatMaster netPatMaster);

    //查询最大patient_id
    public String findMaxIndex();

    //改变发送标志
    public Integer send(NetPatMaster netPatMaster);

    /**
     * 义诊患者不关联检查检验信息
     * @return
     * @author xueyx
     */
    public List<NetPatMaster> onlyFreePersonList(NetPatMaster netPatMaster);

    /**
     * 通过用户patientId获取病人基本信息
     * @param patientId
     * @return
     */
    public NetPatMaster findIndexInfoByPatientId(@Param("patientId") String patientId);

    /**
     * 通过用户用户baseinfo获取病人基本信息
     * @return
     * @author xueyx
     */
    public NetPatMaster findIndexInfoByBaseinfo(String baseinfo);

    /**
     * 旧虚拟诊室有检测检验的患者
     * @return
     * @author xueyx
     */
    public List<NetPatMaster> findXuniPatMasterIndexs(NetPatMaster netPatMaster);

    /**
     * 新虚拟诊室有检测检验的患者
     * @return
     * @author xueyx
     */
    public List<NetPatMaster> findResultPatMasterIndexs(NetPatMaster netPatMaster);

    public List<NetPatMaster> findIndexInfoByIdNoOrTel(@Param("idNo") String idNo, @Param("tel") String tel);

}